<?php
/**
 * The header for our theme.
 *
 * @package ThemeGrill
 * @subpackage Ample
 * @since Ample 0.1
 */
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
  <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <meta name="description" content="<?php bloginfo( 'description' ); ?>">
    <meta name="author" content="">

    <title><?php if ( is_home() ) {
        bloginfo('name'); echo " - "; bloginfo('description');
    } elseif ( is_category() ) {
        single_cat_title(); echo " - "; bloginfo('name');
    } elseif (is_single() || is_page() ) {
        bloginfo('name'); echo " - "; single_post_title();
    } elseif (is_search() ) {
        echo "搜索结果"; echo " - "; bloginfo('name');
    } elseif (is_404() ) {
        echo '页面未找到!';
    } else {
        wp_title('',true);
    } ?></title>

   <!-- Bootstrap core CSS -->
    <link href="http://v3.bootcss.com/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="http://cdn.bootcss.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
    
    <link rel="stylesheet" href="<?php autoVer(bloginfo('template_url').'/style.css');?>" type="text/css">
    <link rel="stylesheet" href="<?php autoVer(bloginfo('template_url').'/css/header.css');?>" type="text/css">
    <!-- Just for debugging purposes. Don't actually copy these 2 lines! -->
    <!--[if lt IE 9]><script src="http://v3.bootcss.com/assets/js/ie8-responsive-file-warning.js"></script><![endif]-->
    <script src="http://v3.bootcss.com/assets/js/ie-emulation-modes-warning.js"></script>
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="http://cdn.bootcss.com/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script src="//cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="http://v3.bootcss.com/dist/js/bootstrap.min.js"></script>
    
    <?php
    /**
     * This hook is important for wordpress plugins and other many things
     */
    wp_head();
    ?>
  </head>

  <body <?php body_class(); ?>>
    <header class="main-header">
        <div class="container">
            <div class="row">
                <div class="col-md-3">
                    <a href="<?php echo home_url();?>">
                        <img class="img-responsive" src="<?php bloginfo('template_url');?>/img/head.png" alt="<?php echo bloginfo('name');?>">
                    </a>
                </div>
                <div class="col-md-9 hidden-xs">
                    <?php get_template_part('searchform'); ?>
                </div>
            </div>
        </div>
    </header>
    <nav class="navbar navbar-default navbar-header" role="navigation">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
                <?php
                    if ( has_nav_menu( 'primary' ) ) {
                        wp_nav_menu(
                          array(
                             'theme_location' => 'primary',
                             'menu_class'    => 'nav navbar-nav navbar-right',
                             'container'     => 'false'
                          )
                        );
                    }
                    else {
                        wp_page_menu();
                    }
                ?>
            </div>
            <!--/.nav-collapse -->
        </div>
    </nav>
<div class="container content">